﻿using System.Runtime.Serialization;
using Ooaavee.Data.Model;

namespace Ooaavee.Data.Queries
{
    [DataContract]
    public sealed class QueryResult
    {
        internal IQuery Parent { get; set; }

        [DataMember]
        private QueryResultRowCollection _rows;

        public QueryResultRowCollection Rows
        {
            get { return _rows ?? (_rows = new QueryResultRowCollection()); }
        }

        [DataMember]
        public Table Table { get; set; }

        [DataMember]
        public bool ErrorsOccurred { get; set; }
    }
}
